<template>
  <div ref="main" style="width:100%;height:400px;" />
</template>

<script>
export default {
  mounted() {
    var myChart = this.$echarts.init(this.$refs.main)
    myChart.setOption({
      title: {
        text: '当周课程数'
      },
      xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
      },
      yAxis: {
        type: 'value'
      },
      series: [
        {
          data: [Math.floor(Math.random() * 40), Math.floor(Math.random() * 40), Math.floor(Math.random() * 40), Math.floor(Math.random() * 40), Math.floor(Math.random() * 40), Math.floor(Math.random() * 40), Math.floor(Math.random() * 40)],
          type: 'line',
          smooth: true
        }
      ]
    }
    )
  }
}
</script>

<style lang="scss" scoped>

</style>
